<?php 
	class Profile extends Model{
		function Profile(){
			parent::Model();
		}

		/*
		 * Fetches all the information about a user.
		 * $user_id -> indicates the session id userdata of the user.
		 */
		function select ($user_id){
			$this->db->from('user');
			$this->db->where('user.user_id', $user_id);
			$query = $this->db->get();
			return $query->row_array();
		}
		
		/*
		 * Update query. This updates the information of a user.
		 * $user_id -> indicates the session id userdata of the user.
		 * $user -> indicates the the information to be passed and to be updated.
		 */
		function update($user, $user_id){
			return $this->db->update('user', $user, array('user_id'=>$user_id));
		}
	}
?>
